Can I use Raihan if I don't have any basic Energy cards in my discard pile to attach to 1 of my Pokemon?
No, the main effect of Raihan is attaching a basic Energy card from your discard pile to 1 of your Pokemon, so you can't play the card if you can't do that.
Source: Evolving Skies FAQ; TPCi Rules Team (2021-08-26)

Relevant cards

Note: All applicable cards may not be listed below.
SWSH7_152
SWSH7_152