X were a metal band known for their excesses back in the late 80's especially during the time of Vanishing Vision. They were basically a bunch of rowdy drunk musicians who spent so much money on alcohol or destructive rampages that they were unable to sleep in hotels and had to stay in local parks after their gigs. Given these circumstances I'd say it is almost certain that the band members both came into contact with and consumed a variety of illegal substances.
What we do know, however, is that by the time mainstream success was attained the band members settled down dramatically and appeared to use drugs, if any, seldom and in ways which would never become a habit (with the exception of Taiji, which apparently played a hand in Yoshiki firing him). In fact, by the time Yoshiki bought a studio in LA in 1992 he had pretty much given up alcohol entirely to allow him to better focus on his work. Toshi doesn't drink and hasn't for many, many years (although Yoshiki said recently they shared a bottle of wine, so I guess he dabbles from time to time).
Pata and Hide were well known to be alcoholics. Yoshiki's biography states in no uncertain terms "Hide was an alcohol addict, and occurances of him running into trouble were not uncommon", and in a 1999 Fools Mate interview Yoshiki said of Pata "He was always drinking and just asked to be left alone".
Heath is a bit of an enigma, but he certainly used to like a drink - infamously when he tried out for X Japan he turned up stinking of alcohol and very hungover, much to the disdain of Yoshiki.
As for Sugizo, he used to be a little bit of a loose cannon. Back in the early days of Luna Sea, him, Hide and J used to spend their days off drinking in parks. He was known for his wild excesses and gained the reputation of being an extremely difficult and selfish person to be around and to work with, it is only in the past 10 years or so that he has chilled out considerably after feeling the burden of responsibility from the birth of his daughter. When SKIN was announced a lot of people in Japan were dumfounded as to how Sugizo and Gackt could be in a band together given the violent hatred the two had for each other in the past. Also, as a side note, if you look back into old pictures of Sugizo he has a "coke nail" - I think that pretty much explains itself.