I got it working by doing this:
(defun align-= (p1 p2) "Align lines by =" (interactive "r") (align-regexp p1 p2 "\\(\\s-*\\)=" 1 1 nil) )
As far as I understand it align-regexp is not receiving what you think it is receiving.
You can test it manually by invoking M-x align-regexp <RET> = <RET> and then hitting C-x ESC ESC (by default repeat-complex-command is bound to C-x ESC ESC, you can also use M-n / M-p to move in the history) and you'll see exactly what is passed to align-regexp. I then copied the line into the function. (I also used interactive "r" because it's convenient)
It's working for me on Emacs 24.
Related but not 100% identical to:
Inconsistent M-x align-regexp vs. C-u M-x align-regexp behaviour
And also:
Marker does not point anywhere from align-regexp (Emacs)