Yes, you can play the game with a controller, but we recomend you to use touch controls, as it's easier to manipulate the blocks.
The iOS version of the game is compatible with all MFI (Made for iPhone) certified controllers.
On Android, the market is so highly diversified in terms of devices and controller models that we unfortunately cannot test and guarantee compatibility with each one of them!