In your example, you compare message with integers in this conditional:
if (message==1):
Which will never work since 1 is not the string '1'. To fix this, you need to compare == instead with strings:
if (message=='1'):
You also need to loop over each of these bits and append the calculations to a list. Your current example doesn't support this.
One simple approach to this problem is to store the theta mappings in a dictionary, loop over each bit in bit and append the correct calculations. You also don't need to .join() the list into a bit string beforehand, since you loop over each item anyway. A design decision could be to keep it as a string to begin with, such as '1001', but this is up to you.
Demo:
import math
bit = ['1','0','0','1']
theta = {'0': 45, '1': 0}
result = []
for b in bit:
hwpx = [0, math.cos(4*math.radians(theta[b])), math.sin(4*math.radians(theta[b])), 0]
result.append(hwpx)
print(result)
Output:
[[0, 1.0, 0.0, 0], [0, -1.0, 1.2246467991473532e-16, 0], [0, -1.0, 1.2246467991473532e-16, 0], [0, 1.0, 0.0, 0]]
or as a list comprehension:
result = [[0, math.cos(4*math.radians(theta[b])), math.sin(4*math.radians(theta[b])), 0] for b in bit]
By using a dictionary in the above approach, there is no need for any conditionals, since you can use the mapped theta value depending on the bit string found. Then all you need is a simple loop and some calculations to worry about.
If you don't want to use a dictionary here, then conditionals work fine:
import math
bit = ['1','0','0','1']
result = []
for b in bit:
theta = 0
if b == '0':
theta = 45
hwpx = [0, math.cos(4*math.radians(theta)), math.sin(4*math.radians(theta)), 0]
result.append(hwpx)
print(result)
# [[0, 1.0, 0.0, 0], [0, -1.0, 1.2246467991473532e-16, 0], [0, -1.0, 1.2246467991473532e-16, 0], [0, 1.0, 0.0, 0]]