From the Super Mario Wiki

It has been requested that this article be rewritten.

Cheese as seen using Game Boy Horror

Cheese is one of the several ways Luigi can earn money in Luigi's Mansion. Cheese is placed in rooms rather spontaneously. If Luigi uses his Game Boy Horror and selects the cheese, a Gold Mouse will be triggered. This mouse will then appear whenever Luigi crosses a randomly selected mousehole, which will be announced by a distinct chime. Luigi can suck this mouse up for gold. This cheese appears only in the dark, and resembles a triangular prism with several holes in it.

In Neville's Study, there is a book called Darkness is Their Cheese by C. Parmesan that talks about the effects of cheese in the dark on Golden Mice:

"Ghost mice are drawn to darkness as real mice are drawn to cheese... In the dark, they shine gold with contentment. I must try to get close to one before the lights come back on."

In the Nintendo 3DS remake of Mario & Luigi: Bowser's Inside Story, Bowser uses cheese to restore BP instead of Syrup Jars. They recover fifteen Brawl Points when eaten. There are stronger variants of the regular Cheese; Super Cheese, Ultra Cheese, Max Cheese, and Miracle Cheese.