By tapping the happy Sim next to the status bars you can use cupcakes. You can only get one when your sim isn't "inspired". It's next to your sim's needs bar, where your goal is displayed. If your sim is already inspired the cupcake will be white and you can't use it.
You can tell when your Sim isn't inspired when their needs are low (when the bars are red or brown) and they aren't sparkling. The cupcake should be green and you can click on it to get one. However, it costs 5 Lifestyle Points to use, so a better option might be Rainbow Cake slices which you get naturally if you are a VIP.
You can also purchase cocktails at any bar in an area that has one to inspire your Sims instantly. It costs 2,500 Simoleons to buy and lasts 24 seconds for the Sim to order and drink it. Areas that have bars:
- Snow Park
- Restaurant (second floor)
- Suncoast Bar (build Tropical Romance Island to get it)
- Completing the Wedding Belles Live Event and claiming the Wedding Reception & Venue template unlocks a bar in the Home Store.