You absolutely can. However, plastics do retain some flavor. So, if you do something with a really strong flavor and then try to switch to something mild you could end up with some extra flavor. Going from say, a high ibu ipa or lambic to a peach wine comes to mind.
Glass does not retain flavor, so anything made from glass will be perfectly fine as long as it has been thoroughly cleaned. The same is true of things that have minimal contact with the brew. Airlock, bottling bucket, etc...
You will need some additional equipment to do the boil for beer, as that isn't something one generally does with wine.