I'm pretty sure that joining a battleground queue requires a hardware event, so an addon can't do it for you. You have to physically press a key or click a button.
If you just want a macro that you can activate with a hotkey instead of moving the mouse to click, move the mouse over the button (just this once) that you want to "click" and type this command:
This will open a special tooltip listing all of the UI objects under the cursor. Find the name of the button (it should be fairly obvious from its name) and then put that in a macro:
Code:
/click RandomBattlegroundQueueJoinButton
Then you can put the macro on an action button and use it with a hotkey, or you can use an addon like
PhanxBind to bind a key directly to the macro without needing to have it on an action button.