Every registered user can rate any game in the BGG database. Although these ratings are entirely subjective, here are the suggested guidelines:
How to do it?
To do this, find the game and go to that game's Main Page; this is most easily done using the Search option near the top of every page. In the topmost section is a series of stars labeled "My Rating", which you can click on to set your rating on a scale from 1 to 10 (once set, you can click on edit to use decimals). You can alternatively go to your In collection drop-down arrow, click on Edit and fill your rating there.
All recorded User Ratings are averaged to produce a single Average Rating shown in a game's "Statistics" section.
If a user has and rates several copies of a game in their collection, then only their highest rating for the game is used.
BGG does not allow people to give multiple ratings to a game through the use of separate accounts.
Sometime around 2017 it was decided not to display on a game's main page its average User Rating if the game has fewer than 30 ratings (since a small number of user ratings can be so extremely variable).
It was later decided to nonetheless show the average rating if the game had been in the database for over a year and was still struggling to get 30 ratings.
The User Ratings are also used to determine the Rank of a game (not expansion) in the BGG database. Only games that have at least 30 User Ratings are eligible for Ranking and to the User Ratings are added a number of "dummy" ratings, which are then used to produce a new average Rating. (E.g. see this thread.) This is the rating that shows up in BGG searches and the number can, and does, vary from the Average Rating. In effect the "dummy" ratings move a game's average towards the norm of all games on the database - making games with few votes but very high ratings lower ranked than games with many more ratings but a lower Average Rating. (If you want to know more about this process, search on "Bayesian" within BGG.) Additionally, secret undocumented stuff is done to try to filter out obviously bogus "shill" or "hate" ratings. (There are many threads from people asking about or trying to figure out the details, but they are intentionally undocumented.)
Note that the number of "dummy" ratings apparently depends on the total number of ratings. This explains the apparent "paradox" (often asked in the forums, e.g. here) of why game X is higher ranked than game Y overall, but game Y is higher ranked than game X in subdomain Z.