As far as using X10 security modules to trigger actions, as long as HG sees the event, you certainly can trigger off of it though how easy/difficult that is depends on what your action will be.
If all you want to do is turn on a module when a security sensor (motion, door/window, etc) is triggered, you can do that easily with a wizard script. I'm not that familiar with these, but they work very similar to the AHP coding scheme where you simply select the trigger and insert the action(s) to perform in a list. I have used these for very simple things but it's not generally how I have things set up.
If you want to do something more complex, the world is your oyster! All you need to know is one of the available coding languages (C#, perl, etc). I learned C# well enough to build my code and it works very well. If you go that route, I highly recommend looking at the available example code and using the programming/api guide on the HG web site. It's very good overall.
You can also record macros for playback. I believe these are wizard script format so that may be a quick way to get going.